<?php
use Yansongda\Pay\Pay;
use Yansongda\Pay\Log;
require_once("./vendor/autoload.php");
require_once("./lib/fun.php");
require_once("./lib/pdo.php");
$wx_config =  [
            // 小程序appid
            'miniapp_id' => 'wxfd7508b055adc597',
            // 支付商户
            'mch_id' => '1656795437',
            // 支付密钥
            'key' => 'q4CpKGGxmqkxPWjGKrZlFVXpWTBDA3i7',
            // 'notify_url' => 'https://uld.tawei.vip/pay.php?act=wx_back',
            'notify_url' => 'https://uluda.cn/pay.php?act=wx_back',
            'log' => [ // optional
                'file' => 'pay.log',
                'level' => 'info',
                'type' => 'single',
                'max_file' => 30,
            ],
            'http' => [ // optional
                'timeout' => 5.0,
                'connect_timeout' => 5.0,
                // 更多配置项请参考 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html)
            ],
        ];
file_put_contents("./wx.txt",date("Y-m-d H:i:s").'----');
$pay = Pay::wechat($wx_config);
$data = $pay->verify();
$info = $data->all();
$info_arr = json_decode(json_encode($info), true);
file_put_contents("./wx.txt",json_encode($info_arr));



?>